#pragma once
// 错误码
#define ICMS_ERR_NOERROR 			        0       //没有错误
#define ICMS_ERR_UNKNOWN					-100	//未知错误
#define ICMS_ERR_FILE_OVER                  -101    //文件过大
#define ICMS_ERR_TIMEOUT				    -1		//等待超时
#define ICMS_ERR_CONNECT				    -2		//TCP连接失败
#define ICMS_ERR_CREATETHREAD			   -3		//线程启动失败
#define ICMS_ERR_XML					   -4		//XML格式错误
#define ICMS_ERR_CONNECT_CLOSE		       -5		//连接已断开
#define ICMS_ERR_PROTO				       -6		//协议类型错误
#define ICMS_ERR_CHECK_DATA			       -7		//数据校验错误
#define ICMS_ERR_PLAY_LIB				   -8		//加载播放库失败
#define ICMS_ERR_DATA_TIMEOUT			   -9		//获取数据超时
#define ICMS_ERR_NOT_PLAY				   -10		//未打开播放
#define ICMS_ERR_RECORDING			       -11		//正在录像中
#define ICMS_ERR_SINGING				   -12		//正在播放声音
#define ICMS_ERR_OCXINIT_FAIL			   -13		//插件初始化失败
#define ICMS_ERR_OCXLOGIN_FAIL		      -14		//插件登陆设备失败
#define ICMS_ERR_CREATEFILE_FAIL		  -15		//创建文件失败
#define ICMS_ERR_USER_NOMATCH             -16        //用户名不匹配
#define ICMS_ERR_INIT_SOCKET              -17        //初始化socke出错
#define ICMS_ERR_SEARCH_DEVICE           -18        //搜索设备失败
#define ICMS_ERR_NETCLIENT_LIB           -19       //加载PCNetClient库失败
#define ICMS_ERR_NO_DEVICE                -20       //设备不存在
#define ICMS_ERR_SEARCH_FINISH           -21       //历史视频查询完成
#define ICMS_ERR_USER_EXIT                -22      //用户名重复
#define ICMS_ERR_DISK_NOT_ENOUGH         -23     //磁盘空间不足
#define ICMS_ERR_FILE_ISEXIST             -24       //文件存在
#define ICMS_ERR_INVALID_OBJ               -25     //无效对象

#define ICMS_PS_ERR_TIMEOUT				-26		//等待超时
#define ICMS_PS_ERR_LISTEN				-27		//服务监听失败
#define ICMS_PS_ERR_CREATETHREAD		-28		//线程启动失败
#define ICMS_PS_ERR_XML					-29	   //XML格式错误
#define ICMS_PS_ERR_CONNECT				-30		//连接失败
#define ICMS_PS_ERR_CONNECT_CLOSE		-31	   //连接已断开
#define ICMS_PS_ERR_PROTO				-32		//协议类型错误
#define ICMS_PS_ERR_CHECK_DATA			-33		//数据校验错误
#define ICMS_PS_ERR_USER				-34 		//用户不存在
#define ICMS_PS_ERR_USER_PWD			-35 		//用户密码错误
#define ICMS_PS_ERR_USER_LOGOUT			-36 		//用户未登录
#define ICMS_PS_ERR_DATABASE_DATA		-37 		//数据库数据错误
#define ICMS_PS_ERR_REGISTER			-38 		//未注册
#define ICMS_PS_ERR_ATOM_RIGHT			-39 		//无操作权限
#define ICMS_PS_ERR_CHANNEL_RIGHT		-40 		//无通道权限
#define ICMS_PS_ERR_DEVICE_OPEN			-41 		//设备未打开
#define ICMS_PS_ERR_DEVICE_OPEN_REALTIME	-42 		//打开实时流失败
#define ICMS_PS_ERR_DEVICE_OPEN_HIS		    -43 		//打开历史流失败
#define ICMS_PS_ERR_DEVICE_OPEN_DOWNLOAD	-44 		//打开历史视频下载失败
#define ICMS_PS_ERR_DEVICE_STREAM		    -45 		//获取流信息失败
#define ICMS_PS_ERR_DEVICE_TALK_OPENED	    -46 		//对讲流已打开
#define ICMS_PS_ERR_DEVICE_OPEN_TALK		-47 		//打开对讲流失败
#define ICMS_PS_ERR_CYCLE_SETTING		    -48 		//未设置轮循
#define ICMS_PS_ERR_PLATFORM_UNSUPPORT      -49       //该平台版本不提供此功能
#define ICMS_PS_ERR_DEVICE_ONVIF_USER_PWD	-50 		//onvif设备用户名密码错误
#define ICMS_PS_ERR_DEVICE_REPEAT		    -51 		//设备已存在
#define ICMS_PS_ERR_DEVICE_PTZ_OPENED	    -52		   //云台已打开
#define ICMS_PS_ERR_DEVICE_OPEN_PTZ		    -53		   //云台打开失败
#define ICMS_PS_ERR_PTZ_OPEN				-54		   //云台未打开

#define ICMS_PSSERR_DB				-55 				//创建数据库为空
#define ICMS_PSSERR_OPNE_DB			-56 				//打开数据库失败
#define ICMS_PSSERR_RECSET			-57 			//创建数据集为空
#define ICMS_PSSERR_OPNE_RECSET		-58 			//打开数据集失败
#define ICMS_PSSERR_CREATE_CONN		-59				//建立新连接失败
#define ICMS_PSSERR_OPEN_HIS		-60 			//打开存储视频失败
#define ICMS_PSSERR_DOWNLOAD_NULL	-61 				//下载视频数据不存在
#define ICMS_PSSERR_DOWNLOAD_FAILED	-62 				//下载数据失败
#define ICMS_PSSERR_NOT_FILESTREAM	-63 				//文件流不存在

#define ICMS_PVD_REG_ERR					-64 	//注册失败
#define ICMS_PVD_SYN_ERR					-65 		//同步数据失败
#define ICMS_PVD_HEART_ERR				    -66 		//心跳格式错误
#define ICMS_PVD_RTVIDEO_ERR				-67		//请求实时视频失败
#define ICMS_PVD_VIDEO_MAX				    -68 	//视频达到上限连接数
#define ICMS_PVD_HISVIDEO_ERR			    -69 	//请求历史视频失败
#define ICMS_PVD_PWD_ERR					-70 		//用户名或密码错误
#define ICMS_PVD_LACK_RIGHT				    -71 		//权限不足
#define ICMS_PVD_NOT_INIT				    -72 	//没有初始化
#define ICMS_PVD_CHAN_ERR				    -73 		//通道号错误
#define ICMS_PVD_VER_ERR					-74 		//版本不匹配
#define ICMS_PVD_CONN_FAILED				-75 		//连接设备失败
#define ICMS_PVD_SEND_FAILED				-76 		//向设备发送失败
#define ICMS_PVD_REC_FAILED				    -77 		//从设备接收数据失败
#define ICMS_PVD_REC_TIMEOUT				-78 		//从设备接收数据超时
